package com.example.preventlosing;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.os.Bundle;
import android.view.Menu;
import android.widget.ImageView;

public class ImageActivity extends Activity {
	ImageView iv;
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_image);
		iv = (ImageView)findViewById(R.id.imageView1);;

		Intent i= getIntent();
		byte[] imageData = i.getByteArrayExtra("imageData");
		Bitmap bmp = BitmapFactory.decodeByteArray(imageData, 0, imageData.length);
		iv.setImageBitmap(bmp);


	}
	
	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.image, menu);
		return true;
	}

}
